From: Gerd Moellmann Date: Wed, 1 Aug 2001 08:02:45 +0000 (+0000) Subject: (animate-string): Handle case that the string is X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~62584 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=01056f71f736ebfd7427de5526f950115ed2fff9;p=emacs.git (animate-string): Handle case that the string is longer than the window is wide. --- diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 5ddd90d5a72..ee0c070912f 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -101,7 +101,7 @@ in the current window." (or hpos ;; HPOS unspecified, so compute ;; it so as to center the string. - (/ (- (window-width) (length string)) 2))))) + (max 0 (/ (- (window-width) (length string)) 2)))))) (dotimes (i animate-n-steps) ;; Bind buffer-undo-list so it will be unchanged when we are done. ;; (We're going to undo all our changes anyway.)